// TOWN DIALOGUE SCRIPT
//    Town 0: Krizsan

begintalkscript;

variables;

short i,j,k,r1,choice;

begintalknode;
	tag = 10;
	state = -1;
	text1 = "We fight slimes every day.";
	text2 = "The horrors are everywhere.";
	text3 = "Who made them all?";
	text4 = "You look odd.";
	text5 = "Keep moving.";
	text6 = "The slimes are gone!";
	text7 = "We might live.";
	text8 = "We must stay vigilant.";
	action = SPEECH_BUBBLE;
	code =
		cs();
		if (gf(307,3) > 0)
			as(get_ran(1,4,8));
			else as(get_ran(1,1,5));
	break;


// Mayor Arbuckle

begintalknode;
	tag = 60;
	state = -1;
	nextstate = 21;
	question = "Mayor Arbuckle";
	text1 = "You meet a small, exhausted man with the bland look of a natural-born bureaucrat. He sits in an impressive, polished oak chair far too large for him. His fine clothes were brought out to this remote town at great expense.";
	text2 = "You are a dirty, armed citizen of the underworld, making an unexpected visit to his hall. His expression is hard to read. He decides, wisely, to be cordial. _Welcome, outsider, to the city hall of Krizsan. I am Mayor Arbuckle._";
	text5 = "Mayor Arbuckle watches you without any sign of visible emotion. _Still here, outsider? What else do you want? The people of Krizsan need no more trouble._";
	text6 = "He thinks. _Though ... There may be a way we can help each other. Let's talk._";
	action = INTRO;
	code =
		if (gf(0,18) > 0)
			rs(6);
	break;
	
begintalknode;
	state = 21;
	nextstate = 22;
	question = "_Tell me about Krizsan._";
	text1 = "His eye develops a nervous twitch. _I was picked and delivered by the Empire to look after the southern Valorim region. It was a nightmare assignment, and the monsters have only made it worse._ He surprises you with his sudden bluntness.";
	text3 = "_I was picked by the Empire to look after the southern Valorim region. It has been a nightmare assignment, and the monsters only made it worse._ He surprises you with his sudden bluntness. _Things have improved, of course, but difficulties remain._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 22;
	nextstate = 23;
	question = "_Has the Empire settled this entire continent?_";
	text1 = "_I believe so, yes. More or less. The backwater continent of Valorim is only recently settled. A post here was a dead end for a career even as it was. Then the slimes appeared._";
	text2 = "_The only worse job is anything dealing with Avernum._";

begintalknode;
	state = 22;
	nextstate = 24;
	question = "_I want to know more about the monsters._";
	text1 = "_It's bad enough that this is the least developed town in the least developed area in the not at all developed continent of Valorim. But then the slimes appeared and started to destroy everything._";
	text3 = "_It's bad enough that this is the least developed town in the least developed area in the continent of Valorim. But then the slimes appeared and started to destroy everything. The destruction has stopped, but there is much to repair._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 24;
	nextstate = 25;
	question = "_How long have you had problems with these slimes?_";
	text1 = "He looks at you cannily. _I will be blunt. You're an adventurer from Avernum. I don't know why you're here. I don't care. We have too much else to worry about._";
	text2 = "He wipes nervous sweat from his forehead. _But about the slimes. I have a mission for you, and a considerable reward._";
	text3 = "_It is not important. That work is done. The rebuilding has begun._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 24;
	nextstate = -1;
	question = "_How extensive is the destruction caused by the slimes?_";
	text1 = "_It's getting worse every day. They can ooze through holes in our walls and attack us at any hour, in any place. I haven't slept a good night's sleep for months, and I'm far from the only one._";
	text3 = "_Well, it's true that for the most part, the slimes have subsided. There are still a few around, however, and the damage still needs to be repaired. Much work remains to be done._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 23;
	nextstate = -1;
	question = "_When was Valorim settled?_";
	text1 = "_The settlement of Valorim only began two centuries ago. It is still only sparsely populated, and is the only area where monsters are still known to roam free._";
	text2 = "_The other three continents are completely settled. And, to be honest, I wish I was there._";

begintalknode;
	state = 23;
	nextstate = -1;
	question = "_So being assigned out here was a punishment?_";
	text1 = "_Well, I was an inconvenience. I was at the wrong end of a little office power struggle, and ended up at the wrong end of the world. That's the Empire for you._";

begintalknode;
	state = 25;
	nextstate = 21;
	condition = gf(0,18) <= 1;
	question = "_What sort of mission did you have in mind for me?_";
	code =
		run_hardcode(9);
	break;

begintalknode;
	state = 23;
	nextstate = -1;
	question = "_But Avernum was sealed off. How could it be a problem for us, umm, loyal Empire citizens?_";
	text1 = "His mouth twitches. _Don't bother to pretend. I know there are Avernites running around. I don't care. We have too many other problems, and I'm not foolish enough to believe Avernum would attack us by dropping slimes in the middle of nowhere._";
	text2 = "_Just don't create trouble, or I will have to start caring. If you get my meaning._";

begintalknode;
	state = 21;
	nextstate = -1;
	condition = gf(307,3) >= 1 && gf(0,18) == 1;
	question = "_I have stopped the slime plague._ Tell the tale.";
	code =
		run_hardcode(118);
	break;

begintalknode;
	state = 21;
	nextstate = -1;
	condition = gf(4,5) < 2 && gf(0,18) > 1;
	question = "_Now that the slimes are gone, anything else I can do to help?_";
	text1 = "_Honestly, I'd rather you moved on. I don't want to get in trouble for dealing with you. Maybe even get sent to Avernum myself._";
	text2 = "_But ... I have had word from Mayor Abernathy of Shayder. That city is on the Isle of Bigail, to the northwest. They have their own plague of horrible monsters._";
	text3 = "_If you truly want to help the people of the surface, you should travel there and see her._";
	code =
		sf(4,5,1);
		toggle_quest(103,1);
	break;

begintalknode;
	state = 21;
	nextstate = 26;
	condition = gf(0,18) == 1 && gf(307,3) == 0 && gf(46,12) == 0;
	question = "_Suppose I wanted to try to deal with the slimes. How should I go about it?_";
	text1 = "_Hah. If we knew, did you think we would ask for help?_ He thinks. _There is one possibility, actually. There is a tower to the west of here, on the beach. We believe that there is a mage there who knows how to control the slimes. His name is Bojar._";
	code =
		toggle_quest(108,1);
	break;
	
begintalknode;
	state = 26;
	nextstate = -1;
	question = "_How does Bojar control them? Have you asked?_";
	text1 = "_No. Unfortunately, he's quite mad. He has killed every soldier we've sent there, and we can't afford to send any more. We hope that you might have more success._";

begintalknode;
	state = 26;
	nextstate = -1;
	question = "_Why are you asking me for help? I'm an outsider._";
	text1 = "_Because we have had no luck._ He lowers his voice and leans close to you. _Smart and talented people do not stay out here. They go north to seek their fortunes. The people under my control are simply not up to the task at hand._";
	text2 = "_Do I think you will succeed? No. Am I willing to take the chance of asking for your help? Yes._";

begintalknode;
	state = 21;
	nextstate = 27;
	question = "_Why did you call me an outsider?_";
	text1 = "_It is not completely obvious? The rumors have already spread. We know that Avernites walk among us._";

begintalknode;
	state = 27;
	nextstate = -1;
	question = "_Why isn't anyone trying to kill me?_";
	text1 = "_This is the frontier. The loyalty to the Empire here is not what it could be. Some will hate you. Some will like you. But most simply won't care._";

begintalknode;
	state = 21;
	nextstate = -1;
	condition = gf(0,18) == 1;
	question = "_Why hasn't the Empire helped with the slimes?_";
	text1 = "Arbuckle looks extremely uncomfortable. _We ... we aren't sure. I have sent two messengers up north to try to get an official response. Neither has returned. It is very difficult to communicate across Valorim._";
	text2 = "_But I do not understand why they have given us so little help! Someday, I hope to journey north myself and find out what happened._";

begintalknode;
	state = 21;
	nextstate = -1;
	condition = gf(0,18) >= 2;
	question = "_How have things gone since I destroyed the slimes?_";
	text1 = "_Well. So well that I have no need for adventurers. My guards have been up to the task of destroying the remaining pests. And that is what they are now. Dangerous pests, but pests nonetheless._";

begintalknode;
	state = 21;
	nextstate = -1;
	condition = gf(0,18) == 1 && gf(307,3) == 0 && gf(46,12) == 0;
	question = "Report on your progress dealing with the slimes.";
	text1 = "You report to Arbuckle what you have found and done. He shakes his head. _You still haven't eliminated the true source of all the slimes. Keep searching._";
	text2 = "_If you can't find where the slimes are coming from, you should visit the mad mage Bojar, in his tower to the west. He has learned how to master them._";

begintalknode;
	state = 21;
	nextstate = -1;
	condition = gf(0,18) == 1 && gf(307,3) == 0 && gf(46,12) > 0;
	question = "Report on your progress dealing with the slimes.";
	text1 = "You report to Arbuckle what you have found and done. You make sure to tell him what you learned in the Agate Tower: Where the slimes are coming from.";
	text2 = "Arbuckle is pleased. _A pit on the coast to the east? Very helpful. Even if the slimes consume you, we can use this knowledge to hunt them._";
	
// Captain Maxine

begintalknode;
	tag = 80;
	state = -1;
	nextstate = 57;
	question = "Captain Maxine";
	text1 = "This woman carries a huge halberd around with her. Her weapon and breastplate have been pitted by tiny spots of dried slime.";
	text2 = "She shifts her halberd to one hand and tips her helmet to you. _Greetings, traveler. I am Captain Maxine. Nice to take a break from fighting the slimes._";
	text5 = "_Anything else to say, traveler?_ You notice that her boots and chain leggings have had many small holes burned into them. Probably the result of multiple run-ins with the slimes.";
	action = INTRO;

begintalknode;
	state = 57;
	nextstate = 58;
	question = "_Are you a soldier of Krizsan?_";
	text1 = "She shrugs her shoulders. _I can't talk long. Have work to do. I look after the garrison and city hall. Plenty to do, what with the slime invasion._";

begintalknode;
	state = 58;
	nextstate = -1;
	question = "_Where's the garrison?_";
	text1 = "_Wherever my soldiers are. They're good men, but there are too many slimes, and they're everywhere. We do our best._";

begintalknode;
	state = 58;
	nextstate = 59;
	question = "_How is city hall?_";
	text1 = "_Just between you and me, City Hall isn't too useful to us. I mean, are we going to club the slimes to death with paperwork? That's all Cindy and Agrod have contributed._";
	text3 = "_Looking after City Hall is not too difficult, now that there aren't so many slimes. Cindy and Agrod can stop cowering in their rooms._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 59;
	nextstate = 58;
	question = "_Who is Cindy?_";
	text1 = "_She does research, trying to figure out how to fight the slimes. She's nowhere near bright enough, and I've lost good men trying out her schemes. Still, she's come close sometimes. She's still worth the trouble._";
	text3 = "She shakes her head angrily. _She was doing magical research on the slimes. One day she said she might know how to deal with them. The next day a tiny one crawled out of a vial she was holding and sprayed her face with acid! Killed her! Damn waste._";
	code =
		if (day_reached(25,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 59;
	nextstate = -1;
	question = "_Who is Agrod?_";
	text1 = "_Hah! We begged the Empire for help, and who did they send? A worthless paper pusher. I'd like to use him as a shield, that's what I'd like._";
	text3 = "_Oh, he was some Empire paper pusher who had an office here. Wasn't paying attention a few days ago. A slime blasted him with a bolt of fire. No great loss._";
	code =
		if (day_reached(55,0))
			remove_string(1);
			else remove_string(3);
	break;
begintalknode;
	state = 57;
	nextstate = 60;
	question = "_How goes the slime invasion?_";
	text1 = "_Look, every minute I'm talking to you is another minute I'm not hunting those blobs of evil goo. No offense, but you're not worth it._";
	text3 = "She claps you on the shoulder. _I heard that the slimes have started to disappear, and that you're likely responsible! Good work! Bad news is, not all of the slimes are dead yet, though the source is gone. The chopping continues._";
	action = DEP_ON_SDF 307 3 0;


begintalknode;
	state = 60;
	nextstate = -1;
	condition = gf(307,3) <= 0;
	question = "_Can I help you kill slimes?_";
	text1 = "_Kill as many as you want on your own time. If you're looking for some kind of reward, talk to Mayor Arbuckle._";

begintalknode;
	state = 57;
	nextstate = 61;
	question = "_You called me a traveler. You know that I'm from far away?_";
	text1 = "_You must be, if you don't know that we don't like stinking, filthy nephilim in our towns._";
	text3 = "_No concern to me as long as you're peaceful. I don't have any problem with anyone but those stinking nephilim._";
	code =
		if (species_in_party(2))
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 61;
	nextstate = -1;
	condition = gf(0,13) == 0;
	question = "_If you know what's good for you, you'll apologize for that comment._";
	text1 = "She laughs at you. _Fool. I'll give you some advice for nothing. You want to wander around on the surface? Fine with me. But show respect and know your place, or you'll finish up dead._ She looks at you with contempt.";
	action = SET_SDF 0 13 1;

begintalknode;
	state = 61;
	nextstate = -1;
	condition = gf(0,13) == 0;
	question = "_Why not?_";
	text1 = "_Because they are stupid and dirty and the Empire wants them all dead. And they will succeed, and good riddance to them. That's why._ She shrugs. _I think nephil are disgusting, but I can leave them be. Others aren't so nice._";
	action = SET_SDF 0 13 1;

// Cindy

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 85;
	question = "Cindy";
	text1 = "This mage is pacing back and forth, completely involved in her own thoughts. She stares intently into a vial of brightly colored slime held in her hand.";
	text2 = "It takes a moment to get her attention. _Oh. I am ... umm ... I'm Cindy. Hi._";
	text5 = "Cindy looks up at you, but her gaze is absent. Her mind is clearly miles away. The slime in the vial she holds bubbles and jiggles.";
	action = INTRO;

begintalknode;
	state = 85;
	nextstate = 86;
	question = "_What are you doing in here?_";
	text1 = "_I am ... Oh._ She stares at the vial and thinks for a moment. _I... Research. I am doing research._";

begintalknode;
	state = 86;
	nextstate = -1;
	question = "_What's in that vial?_";
	text1 = "She holds the vial of slime up so that you can see it. It's mauve and moves around inside the vial. You hope that she's careful. _This ... A sample. Very useful. For research._";

begintalknode;
	state = 86;
	nextstate = 87;
	question = "_What are you currently researching?_";
	text1 = "_Looking for ways to defeat slimes._ She uncorks the slime, and sniffs it. _The danger to us is great._";
	text3 = "_Looking for ways to prevent the return of the slimes. It is wonderful that their attacks have dwindled, of course, but for all we know, they are going to grow back and return. If they do, we will be prepared._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 87;
	nextstate = -1;
	condition = gf(307,3) >= 1;
	question = "_Do you really think the slimes will return?_";
	text1 = "She looks up at you, annoyed by the persistent questioning. _They might return. They might not return. We must prepare now. Find ways to fight them, or at least keep them out._ She resumes her pacing.";

begintalknode;
	state = 87;
	nextstate = 88;
	condition = gf(307,3) == 0;
	question = "_Made any progress learning how to defeat these slimes?_";
	text1 = "_No, not yet. The slimes can enter Krizsan at will. They slide though holes in our walls. I look for a weapon we can use against them, but the work is slow._ She thinks. _Perhaps you should leave, so I can work more._";
	text3 = "_No, I wish I had. The slimes enter Krizsan at will. In fact, they killed the shipwright last week, and have even attacked this city hall. I look for a weapon to use against them. Salt didn't work. I will search more._";
	code =
		if (day_reached(10,0) == FALSE)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 88;
	nextstate = -1;
	question = "_What things have you tested against the slimes?_";
	text1 = "_Leave me be, I need to think._";
	text3 = "_Salt worked against slugs. Tried it on slimes. Lost a good soldier trying that one out. Oh well._ She shrugs, and continues to concentrate.";
	code =
		if (day_reached(10,0) == FALSE)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 85;
	nextstate = -1;
	question = "_It looks like you're in the middle of a dangerous experiment._";
	text1 = "She seems to barely hear you. _Oh? Yes? I suppose. If I'm not careful, the slime can..._ Something occurs to her and she makes a note on a scroll. When she's finished, she has forgotten what you were talking about. She wanders off.";
	action = END_TALK;
	
// Fellows

begintalknode;
	tag = 120;
	state = -1;
	nextstate = 113;
	question = "Fellows";
	text1 = "This man has the rough, worn look of a sailor, but he wears the robes of an apprentice mage (dirty and torn robes, but robes nonetheless). He stares intently into an orb on the table in front of him.";
	text2 = "As you enter, he looks up from the orb. _Welcome, I am Fellows._";
	text5 = "Fellows says, in an affected fortune teller voice, _Anything else, explorer? Come forth, so I may speak new truths unto you._";
	action = INTRO;

begintalknode;
	state = 113;
	nextstate = 114;
	question = "_What can you do for me?_";
	text1 = "_Greetings, child! I will forecast your future for only ten coins! Also, I can share with you my great magical skills!_";

begintalknode;
	state = 114;
	nextstate = 116;
	question = "_What are your magical skills?_";
	text1 = "He waves his hands, and there is a flash of light. It's a very simple spell. _I can create charms which will shift your fortunes. Purchase one, and you will never be devoured by the seas. A bargain, compared to the value of your life!_";

begintalknode;
	state = 114;
	nextstate = 115;
	condition = gf(0,12) == 0 || gf(0,17) == 0;
	question = "_Go ahead and tell my future._ Pay 10 coins.";
	text1 = "He takes your gold and waves his hands over the orb. _I see many adventures, and much fame! And treasure!_ You aren't impressed. _You will also be a great hero. Well done!_";
	text3 = "_I am sorry. The secrets of the ages require the proffering of gold to see!_";
	code =
		if (coins_amount() < 10)
			rs(1);
			else {
				rs(3);
				sf(0,12,1);
				}
	break;
	
begintalknode;
	state = 116;
	nextstate = -1;
	question = "_Sure. I'll buy one of your charms._";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Lucky Charms","Fellows is a mediocre sage and a worthless psychic, but he does have a knack for crafting useful charms. He also knows enough to charge a respectable price for them.",23,4,3);
	break;

begintalknode;
	state = 113;
	nextstate = 117;
	question = "_Were you a sailor?_";
	text1 = "_Yes, though I left that career behind to follow a career in the psychic arts. And a good thing too._";

begintalknode;
	state = 117;
	nextstate = -1;
	question = "_Why?_";
	text1 = "_Because Valorim is quarantined, or so the rumor goes. Ships aren't allowed to sail to or from this continent. Puts quite a crimp in the sea trade._";

begintalknode;
	state = 115;
	nextstate = -1;
	condition = gf(0,12) > 0 && gf(0,17) <= 1;
	question = "_You really can see into the astral realms?_";
	text1 = "He sighs. _Yes. Sort of. Not well. No. If I had the true sight, I would find the ring I lost. It was a simple gold band, but one I really liked. I dropped it when I was outside the west gate. A slime surprised me._";
	action = SET_SDF 0 17 1;
	code =
		toggle_quest(25,1);
	break;
	
begintalknode;
	state = 113;
	nextstate = -1;
	condition = gf(0,17) == 1 && party_has_item(170);
	question = "_I found a gold band. It might be yours._ (Show it to him.)";
	code =
		run_hardcode(12);
	break;

begintalknode;
	state = 115;
	nextstate = -1;
	condition = gf(0,12) > 0;
	question = "_I'd like to know more about my future._";
	text1 = "_Oh. Um. It really looked glorious. But I don't want to, you know. Spoil the surprise._";

// McElroy

begintalknode;
	tag = 140;
	state = -1;
	nextstate = 141;
	question = "McElroy";
	text1 = "This innkeeper has filthy, dirt-encrusted hands, which have probably pawed over every mug and plate in the place. He gives you a disinterested look. _I'm McElroy. Welcome to the Rowdy Oar. What'll you have?_";
	text5 = "McElroy scratches some dried food off a plate with his fingernail. _What else do you want?_ he grunts.";
	action = INTRO;

begintalknode;
	state = 141;
	nextstate = 142;
	question = "_What do you serve here?_";
	text1 = "He wipes his nose with the back of his hand. _Well, we got the best drinks in the whole town. Only five coins. And we got room in the common room to sleep for the night. Only ten coins. And we'll make sure none of the slimes get ya'._";

begintalknode;
	state = 141;
	nextstate = -1;
	condition = coins_amount() >= 5;
	question = "_I'll have a drink._ Pay 5 coins.";
	text1 = "He serves you some mugs of weak beer, with fragments of brown material floating in it. It's foul stuff, but it's still a good bit better than any of the mushroom beer you ever got in Avernum.";
	code =
		force_char_status(30000,1,20);
		change_coins(-5);
	break;

	
begintalknode;
	state = 141;
	nextstate = -1;
	condition = coins_amount() >= 10;
	question = "_I need a place to sleep._ Pay 10 coins.";
	text1 = "You are shown to the bug infested, smelly common room. Regretfully, you lie down for the night. You get some rest. You also get fleas.";
	action = END_TALK;	
	code =
		revive_party();
		change_coins(-10);
		relocate_char(get_pc_id(0),26,10,FALSE);
		relocate_char(get_pc_id(1),27,10,FALSE);
		relocate_char(get_pc_id(2),27,11,FALSE);
		relocate_char(get_pc_id(3),26,11,FALSE);
	break;

begintalknode;
	state = 142;
	nextstate = 143;
	question = "_Having any problems with slimes?_";
	text1 = "_Well, those slime creatures have been sneakin' in all over the place. There was even an attack near here!_";
	text3 = "_Well, there haven't been any slimes around here for a while, but if they come back, they won't get in here!_";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 143;
	nextstate = -1;
	question = "_Where have the slimes attacked?_";
	text1 = "_Well, that little shrine had some difficulties, but there aren't any slimes near here now. You can stay here without any worries!_ You aren't sure that you believe him. He looks worried as he says it.";
	text3 = "_Oh, one will slip through the walls every once in a while, but none get in here. Sleep easy!_ He grins in a way you find not at all reassuring.";
	code =
		if (day_reached(22,0) == FALSE)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 141;
	nextstate = -1;
	condition = 1;
	question = "_Your inn seems ... gross._";
	text1 = "_What? Not good enough for the likes of you, your majesty? Get out._";
	action = END_TALK;

begintalknode;
	state = 141;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Fine. I bet you think you're too good for us. You'll be back._";
	action = END_TALK;


// Dawn

begintalknode;
	tag = 240;
	state = -1;
	nextstate = 401;
	question = "Dawn";
	text1 = "You meet a woman with a sun-weathered face, loose clothes, and a brash demeanor. Tattoos ring her arms and wrists.  She tugs her earlobe as she looks you over. _I'm Dawn. Welcome to my home, traveler._";
	text5 = "Dawn gives you a cocksure grin as you approach. _Anything else I can do for you?_";
	action = INTRO;

begintalknode;
	state = 401;
	nextstate = 402;
	question = "_Do you work here in Krizsan?_";
	text1 = "_Well, I normally sail the open seas. Now I just wait around here. Krizsan's my home, after all._";
	text3 = "_Well, I normally sail the open seas. Now I just wait around here. Krizsan's my home, after all. I hope to sail again soon, now that the slimes are gone. But my hopes aren't high._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 402;
	nextstate = 403;
	question = "_How's the sailing business?_";
	text1 = "_Not much call for shipping now. Ships haven't been sailing since the monsters appeared._";
	text3 = "_Not much call for shipping. There should be, now that the slimes are gone, but there are monsters crawling over all the rest of Valorim too. So nobody is going anywhere._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 403;
	nextstate = 404;
	question = "_Know anything about where the slimes came from?_";
	text1 = "_Interesting thing about that. Just when the slimes started appearing, when I was sailing into Krizsan for the last time before the ships stopped going, I saw some weird lights on the coast._";
	text3 = "_Don't know where they came from. Don't know where they've gone. And that's the way I like it._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 404;
	nextstate = 405;
	condition = gf(307,3) == 0;
	question = "_Which coast?_";
	text1 = "_The south coast, just west of here. There was a tower, and there were some seriously weird lights flashing around it._ She tugs her earlobe thoughtfully.";
	text2 = "_Maybe it's just me, but the slimes must be caused by a bunch of weird magic. Well, there's weird magic there._ She grins. _But what do I know? I'm just a sailor, and you're a genuine Avernite!_";

begintalknode;
	state = 405;
	nextstate = -1;
	question = "_What makes you think that I'm from Avernum?_";
	text1 = "She points at your hand. Then she points at hers. Your hand has become sickly pale during your years in the underworld. The difference is obvious.";

begintalknode;
	state = 405;
	nextstate = -1;
	condition = gf(0,14) == 0;
	question = "_Uhhh ... I don't know what you're talking about. I'm not from Avernum._";
	text1 = "She frowns. _Oh. Well, if you're just good for lies, you're not worth my time._ She turns away and returns to her drink.";
	action = END_TALK;

begintalknode;
	state = 405;
	nextstate = -1;
	question = "_Does it bother you that I am from Avernum?_";
	text1 = "She laughs. _Don't worry! Your secret is safe with me! I was pretty close to being sent down there a few times myself!_";
	action = SET_SDF 0 14 1;

begintalknode;
	state = 401;
	nextstate = 406;
	question = "_How long have you lived here?_";
	text1 = "_I grew up here. There's no way I'm leaving without a fight._";
	text3 = "She shakes her head sadly. _This has always been my home, but the slimes are decimating it. I may try to become an Avernite._ She tugs her earlobe and smiles.  _Looking at you, it can't be that bad a thing to be!_";
	code =
		if (day_reached(25,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 406;
	nextstate = -1;
	question = "_Have you fought many slimes?_";
	text1 = "_Some._ She sighs. _That's the problem. It's easy to kill one slime. Just one stab is all it takes. But they keep coming and coming, and if one gets the drop on you, it'll hit you with magic, or cover you with acid, or worse._";
	text3 = "_That's right. A lot of them. And if the slimes ever come back, I'll be on the front lines against them!_";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 401;
	nextstate = -1;
	condition = coins_amount() >= 10;
	question = "_Can I buy you a drink?_ Pay 10 coins.";
	text1 = "_Well, aren't you a sweetheart? Of course._ You share ale and conversation for a while. It is pleasant.";
	code =
		change_coins(-10);
		sf(1,3,1);
	break;
	
begintalknode;
	state = 401;
	nextstate = -1;
	condition = 1;
	question = "_I'll be going now._";
	text1 = "_All right. Thanks for the company._";
	text2 = "_And I hope you stop by again some time._ She is entirely sincere.";
	action = END_TALK;
	code =
		if (gf(1,3) == 0)
			rs(2);
	break;
	
// Gypsy

begintalknode;
	tag = 260;
	state = -1;
	nextstate = 429;
	question = "Gypsy";
	text1 = "A heavy-set woman stands in the middle of the tavern, commanding everyone's attention. She plays her harp flawlessly. You sit and listen, a rare moment of peace in your dangerous journey.";
	text2 = "When she finishes her song, she walks up to speak with you. Her skin is incredibly pale. She's an Avernite! She bows. _I'm Gypsy._";
	text5 = "Gypsy the Avernite smiles at you. _Always nice to see familiar faces on the surface. I have a few moments to talk before my next set._";
	action = INTRO;

begintalknode;
	state = 429;
	nextstate = 430;
	question = "_What are you doing up on the surface?_";
	text1 = "She tunes her harp as she speaks. _Oh, just touring. Like you, I suppose._";

begintalknode;
	state = 430;
	nextstate = 431;
	question = "_How did you get here?_";
	text1 = "_Well, I've already played pretty much everywhere in Avernum, so I snuck up here. Tricky, but I did it. I was in the first crew that worked on Fort Emergence. Once I got there, it was easy to slip out onto the surface._";
	text3 = "She sighs. _Well, I was having a wonderful time playing in Krizsan. But then the slime situation got too intense, so I came here. It's something of an improvement._";
	code =
		if (day_reached(25,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 430;
	nextstate = 432;
	question = "_Why did you leave Avernum?_";
	text1 = "_Oh, but I was tired of that place! Too damp. Couldn't keep my instrument in tune. Not so bad up here ... there's lots of monsters, slimes and such, but we're all used to that._";
	text2 = "She strums out a short tune on her instrument. It's lovely.";

begintalknode;
	state = 431;
	nextstate = -1;
	question = "_How did you manage to sneak out?_";
	text1 = "_It wasn't difficult. Lots of workers, few guards. And I'm not the only one!_";
	text2 = "_Pretty immoral of me, I know. It's dangerous if the Empire finds out the Avernites are escaping. Happily, in Valorim, nobody seems to care. They're wild folk out here._";

begintalknode;
	state = 432;
	nextstate = -1;
	question = "_Know anything about these monsters?_";
	text1 = "_The monsters are bad for the people up here, but it's no worse than what we're used to. Just be careful and you should be fine._";
	text3 = "She shakes her head. _Lots of monsters everywhere, and it's getting worse all the time. I'm going to have to keep touring soon, just to find someplace safe._";
	code =
		if (day_reached(15,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 429;
	nextstate = 433;
	question = "_You're not supposed to be up here! We are supposed to be the first surface explorers!_";
	text1 = "She chuckles. _Life is full of surprises, isn't it? And you're far from the first._";

begintalknode;
	state = 433;
	nextstate = -1;
	question = "_Really? Who else is up here?_";
	text1 = "_Other people who snuck up with me. Spies from other branches of the Avernite army. Chitrachs who slipped through the net. Sorry to disappoint you._ She smiles and works on tuning her instrument.";

begintalknode;
	state = 429;
	nextstate = -1;
	condition = coins_amount() >= 5;
	question = "_Play something for me?_ (Give her 5 coins.)";
	text1 = "She gladly takes your coins. _Thank you. Food is expensive up here._ She plays a long, complex melody. You nod your thanks and move on.";
	action = END_TALK;
	code =
		change_coins(-5);
	break;

begintalknode;
	state = 429;
	nextstate = -1;
	question = "_I'll be moving on._";
	text1 = "_Me too, soon enough. So many lands I want to see. Maybe I'll see you again._ She returns to the stage.";
	action = END_TALK;
	

// Escovedo

begintalknode;
	tag = 280;
	state = -1;
	nextstate = 457;
	question = "Escovedo";
	text1 = "You meet a dark-skinned man with a variety of tattoos and earrings. He is walking around town aimlessly, carving a belaying pin with a sharp knife. He looks like he's just swallowed a lemon.";
	text2 = "You ask his name. _Hrrmmph. I'm Escovedo. The shipwright, or I used to be._";
	text5 = "Escovedo silently continues to carve the belaying pin. The knife cuts away long, elegant curls of dark wood.";
	action = INTRO;

begintalknode;
	state = 457;
	nextstate = -1;
	question = "_Can I buy a boat?_";
	text1 = "_Pfaugh! My boats lie unfinished! I wait for a shipment of equipment and tools. Slimes dissolved the rest. The stuff doesn't come, so no boats for anybody!_";

begintalknode;
	state = 457;
	nextstate = 458;
	question = "_What keeps you busy around here?_";
	text1 = "He laughs, a harsh, barking noise. _Nothing! Absolutely nothing!_";

begintalknode;
	state = 458;
	nextstate = 459;
	question = "_What would you be doing if you could?_";
	text1 = "_I make ships! Who wants them? No demand, these days!_";

begintalknode;
	state = 459;
	nextstate = 460;
	question = "_Why is that?_";
	text1 = "_The slimes are everywhere, and monsters are around the other cities too! Everyone's looking to their own problems, and nobody's going anywhere. Pfaugh!_";
	text3 = "_The slimes are gone from Krizsan, but monsters are around all of the other cities! Everyone's looking to their own problems, and nobody's going anywhere. Pfaugh!_";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 460;
	nextstate = -1;
	question = "_Pfaugh?_";
	text1 = "_Yeah! Pfaugh!_ He sprays a little bit of spittle on your clothes.";

begintalknode;
	state = 460;
	nextstate = -1;
	question = "_What's causing the monsters?_";
	text1 = "_Like I know anything about that? Pfaugh!_ He turns away.";
	action = END_TALK;

// Ellis

begintalknode;
	tag = 300;
	state = -1;
	nextstate = 485;
	question = "Ellis";
	text1 = "This archer is patrolling the streets of Krizsan, longbow at the ready. He has an arrow nocked and ready to fire it at a moment's notice. As he patrols, he watches the sidewalks and walls, looking for a crack a slime might seep through.";
	text2 = "He moves close to you. _Shhh. I'm hunting slimes. And the name's Ellis._";
	text5 = "Ellis continues to hunt for slimes. _Shhh,_ he says. _They can appear anywhere._";
	action = INTRO;

begintalknode;
	state = 485;
	nextstate = -1;
	question = "_How do you detect the slimes?_";
	text1 = "_With my ears and my nose. I listen to the sizzling sound of the slime acid, and my nose detects their distinct smell. Then, when I detect one, a single arrow will usually solve the problem._";

begintalknode;
	state = 485;
	nextstate = 486;
	question = "_What are you looking for?_";
	text1 = "_I'm hunting for slimes._ He spins around quickly, looking for a slime. Not seeing one, he continues the search.";

begintalknode;
	state = 486;
	nextstate = 487;
	question = "_How goes the slime hunt?_";
	text1 = "_Difficult. They're weak but in great supply. I just try to nail them before they get another victim._";
	text3 = "_Better than before. There haven't been many around for a while, but I'll bet there are still a few hiding, ready to take someone with them._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 487;
	nextstate = -1;
	question = "_How weak are they?_";
	text1 = "_It usually only takes one arrow to kill one. The problem is, pierce one, and two are there the next day. They can ooze through the city walls, and they show no mercy. Every day, they get another victim._";

begintalknode;
	state = 487;
	nextstate = 488;
	question = "_Have the slimes killed someone?_";
	text1 = "_Every day, they get another poor farmer or guard or something. I'm always afraid someone will die because I missed one._";
	text3 = "_They kill farmers or guards alike. And not long ago, one got poor Escovedo. He was a good friend of mine._";
	code =
		if (day_reached(10,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 488;
	nextstate = -1;
	question = "_Will the slimes kill anyone?_";
	text1 = "_The slimes kill innocents and guards alike. They'll engulf a baby in its crib._ He spins around again, looking for slimes. _I kill all of them I can._";

begintalknode;
	state = 488;
	nextstate = -1;
	question = "_How do the victims die?_";
	text1 = "_The acidic slimes can burn through walls. They can catch anyone by surprise and burn them down before they can get away._";
	text3 = "He shakes his head angrily. _Escovedo was a good, good man. He was the shipwright.  One of the magic slimes burned him down before he could get away. Killed in his own shop, too. He didn't deserve that. Nobody does._";
	code =
		if (day_reached(10,0))
			remove_string(1);
			else remove_string(3);
	break;

// Terry

begintalknode;
	tag = 320;
	state = -1;
	nextstate = 513;
	question = "Terry";
	text1 = "You meet a young woman, wearing the long white robes and ankh of a healer. She is an island of calm in this besieged city. Yet, she wears a big axe at her belt.";
	text2 = "_Greetings, wanderers. I am Terry, one of the healers of Krizsan._";
	text5 = "Terry asks, _Do you need my help?_ She looks you over carefully, looking for scars, bruises, and so on.";
	action = INTRO;

begintalknode;
	state = 513;
	nextstate = 514;
	question = "_What kind of work are you engaged in?_";
	text1 = "_Well, I mainly act as the town healer. Lots of work. Plus I maintain the shrine, for what it's worth._";

begintalknode;
	state = 514;
	nextstate = 515;
	question = "_Tell me about your shrine._";
	text1 = "_Well, Krizsan has one small shrine to the healing arts, and I look after it. Nothing compared to what the other cities have. It's more a worry than anything else, I'm afraid._";

begintalknode;
	state = 515;
	nextstate = -1;
	question = "_What is worrying you?_";
	text1 = "_Well, Krizsan has lots of sailors. They're a superstitious lot. They're always coming to pray that their boat doesn't sink. It's all I can do to clean their mud off of everything._";
	text3 = "She sighs and looks down at the axe on her belt. _Well, I was worried about getting people to come to the shrine. Now I'm worried about the slimes. They burned through the west wall not long ago. I'm scared my shrine is the next place they'll reach._";
	code =
		if (which_town() == 0)
			remove_string(3);
			else remove_string(1);
	break;

begintalknode;
	state = 515;
	nextstate = 516;
	question = "_What are the temples in other cities like?_";
	text1 = "_Krizsan is the only major city in Valorim to not have a large temple. Even Shayder has a lovely temple._";

begintalknode;
	state = 516;
	nextstate = -1;
	question = "_Valorim?_";
	text1 = "_This is the continent of Valorim, the least populated continent in the Empire._";

begintalknode;
	state = 516;
	nextstate = 517;
	question = "_What is Shayder like?_";
	text1 = "_It's a big city on the island to the northwest. Home to the Anama Worshipers. Strange lot. Don't quite see things their way, but they have a lovely temple._";

begintalknode;
	state = 517;
	nextstate = -1;
	question = "_Tell me about the Anama._";
	text1 = "_A strange cult on the Isle of Bigail. They believe that the use of magical spells is evil and leads to nothing but harm. Very odd._";
	text3 = "She looks uncomfortable. _I know that you know much more about the Anama than I do. So I won't contribute my meager opinions to the proceedings._";
	action = DEP_ON_SDF 4 0 2;

begintalknode;
	state = 513;
	nextstate = -1;
	question = "_What can you do for me?_";
	text1 = "_Nothing, I'm afraid, except give you a place to rest. You seem in full health, and I have no potions to spare for travelers._";
	text2 = "_Do you need any bandages?_ She is relieved to hear that you have some.";
	text3 = "_Do you need any bandages?_ When she finds that you don't have any, she gives you some.";
	code =
		rs(2); rs(3);
		if (gf(0,29) < 20) {
			if (party_has_item(259))
				as(2);
				else {
					as(3);
					inc_flag(0,29,1);
					reward_give(259);
					}
			}
	break;

// Herron

begintalknode;
	tag = 440;
	state = -1;
	nextstate = 801;
	question = "Herron";
	text1 = "This big, beefy man is gleefully attacking a leg of lamb with a large cleaver. After years of chewing on mushrooms in the underworld, the smell of the food in this shop makes you drool.";
	text2 = "_I'm Herron. Proprietor of Herron's Herring._";
	text5 = "Herron watches you knowingly. _You look like you could use some decent food._ The smell makes it hard to disagree with him.";
	action = INTRO;

begintalknode;
	state = 801;
	nextstate = 802;
	question = "_This place smells great._";
	text1 = "_You look hungry, like you haven't seen good victuals in a long time._ He winks at you. _You're in luck. Herron's Herring has the best food for sale around!_";

begintalknode;
	state = 802;
	nextstate = -1;
	question = "_Can we get herring?_";
	text1 = "He grins. _Well, sorry. We don't have herring, on accounts that the sailors when they come to shore are all sick of it. I just call this place that because it sounds good._";

begintalknode;
	state = 802;
	nextstate = 803;
	question = "_I can't remember the last time I had this sort of food._";
	text1 = "_You have the look of someone who's been living on lichen for a long time._ He winks. _Don't worry. Everyone's spreading rumors about the Avernites who've been sneaking around. Nobody really cares. They're too busy worrying about the slimes._";
	text2 = "_By the way, while you're up here, be sure to go to Jinx's Smithy. She's got the best weapons in town!_";

begintalknode;
	state = 803;
	nextstate = 804;
	question = "_Are you worried about the slime infestation?_";
	text1 = "He brandishes his cleaver. _I'm not worried. Jinx made this for me. A slime comes in, and ... wham!_ He slams the cleaver into the lamb for emphasis.";

begintalknode;
	state = 804;
	nextstate = -1;
	question = "_Do you know Jinx well?_";
	text1 = "_A fine woman, running a fine smithy. And don't think I'm biased or anything just because I'm married to her._ He laughs, and dumps some lamb into a stewpot. ";

begintalknode;
	state = 801;
	nextstate = -1;
	question = "_Can I buy any of your food?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Herron's Herring","Herron is a good cook. Even a mediocre cook would provide better food than you could ever find in Avernum. You unashamedly drool over his goods.",24,4,3);
	break;

begintalknode;
	state = 801;
	nextstate = -1;
	condition = 1;
	question = "_I'm fine, thank you._";
	text1 = "You bid him a friendly farewell.";
	action = END_TALK;

// Jinx

begintalknode;
	tag = 460;
	state = -1;
	nextstate = 829;
	question = "Jinx";
	text1 = "This is one of the tallest women you've ever met. She looks down at you and effortlessly hefts a huge hammer and tongs.";
	text2 = "She wears a leather jerkin and her bare arms are sweaty and muscular. _Welcome to my shop! You can call me Jinx!_";
	text5 = "Jinx gives the hammer a spinning toss, and catches it. _You look like the sort who always needs a good blade._";
	action = INTRO;

begintalknode;
	state = 829;
	nextstate = 830;
	question = "_What sort of shop is this?_";
	text1 = "_Oh, well, what do you think? You can sell me what you got, and purchase weapons in return. Always glad to help a visitor to Krizsan._";

begintalknode;
	state = 830;
	nextstate = 831;
	question = "_Do you get many visitors?_";
	text1 = "She smiles, as if she's in on a joke you don't get. _Krizsan doesn't get many visitors these days, being as it's about as remote a large city as you can get. Sometimes we get people from odd places, though. Where are you from?_";
	text2 = "_Oh, and be sure to ask me if you want a good meal. I know just where to go._ She chuckles at this.";

begintalknode;
	state = 831;
	nextstate = 832;
	condition = gf(0,15) == 0;
	question = "_Well, I'm from Avernum._";
	text1 = "She laughs. _Of course you are! I just wanted to see if you would admit it. Don't worry. Lots of people around here are thrilled to see some actual Avernites. Just be careful. Some people in the more northern cities won't be quite so pleased._";
	action = SET_SDF 0 15 1;

begintalknode;
	state = 831;
	nextstate = -1;
	condition = gf(0,15) == 0;
	question = "_We're travelers from the north._ (Lie.)";
	text1 = "She looks disappointed. _Sure you are. You're from the surface. Whatever you say._";
	action = SET_SDF 0 15 1;

begintalknode;
	state = 831;
	nextstate = -1;
	question = "_Where can I get a good meal?_";
	text1 = "_Well, Herron, who's a ... a solid business acquaintance of mine, runs a food shop near here._ She rubs a small diamond ring on her left hand and giggles. It's strange to see such a huge person giggle.";

begintalknode;
	state = 832;
	nextstate = -1;
	question = "_What northern cities?_";
	text1 = "_You know, Sharimik and the like. Especially Gale. They've gone properly crazy up there. Just watch yourself up there._";

begintalknode;
	state = 829;
	nextstate = -1;
	question = "_Can we do some trading?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Jinx's Weaponry","Jinx makes decent weaponry. It's much better quality than what you can find in Avernum.",25,3,3);
	break;

begintalknode;
	state = 829;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 829;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Thanks for stopping by._ She returns to her forge.";
	action = END_TALK;
	
// Jinx

begintalknode;
	tag = 480;
	state = -1;
	nextstate = 857;
	question = "Jinx";
	text1 = "You meet a very tall woman with a grim face, twisted in anger and grief. She's pounding out a sword, smashing it with a huge hammer. Her heart clearly isn't in it, and the weapon is coming out crooked.";
	text2 = "She says, sadly, _Welcome to my shop. I'm Jinx. _";
	text5 = "Jinx gives you a detached look. She says, _Can I help you?_ in a toneless voice.";
	action = INTRO;

begintalknode;
	state = 857;
	nextstate = 858;
	question = "_What sort of shop is this?_";
	text1 = "At first, she seems not to hear you. Then, after a moment, she begins to speak. _I have weapons for you, if you want. You can also sell me things. For what it matters anymore._";

begintalknode;
	state = 858;
	nextstate = 859;
	question = "_Why? What is wrong?_";
	text1 = "_Wrong? Everything!_ Her face twists in barely controlled fury. _The slimes can kill anyone they want! What does it matter what we do?_";

begintalknode;
	state = 859;
	nextstate = 860;
	question = "_Don't give up hope. We can yet defeat the slimes._";
	text1 = "_That is what my husband thought. My poor Herron. Just cooking in his shop. Slimes oozed in through the floor. Surrounded him, sprayed webs all over him before he could run. Killed him, just like that!_";

begintalknode;
	state = 860;
	nextstate = -1;
	question = "_I'm sorry for your loss._";
	text1 = "Her eyes tear up. _I loved that man. Now I just pass the days until they get in far enough to get my shop too._ ";
	text2 = "She looks embarrassed to be telling this to a stranger, so she goes back to smashing on the sword with her hammer. It looks like it won't be long until it's an unrecognizable lump of metal. She isn't paying any attention to you.";
	action = END_TALK;

begintalknode;
	state = 857;
	nextstate = -1;
	question = "_Can we do some trading?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Jinx's Weaponry","Jinx makes decent weaponry. It's much better quality than what you can find in Avernum.",25,3,3);
	break;

begintalknode;
	state = 857;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 857;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "She doesn't respond. You walk away.";
	action = END_TALK;
	

// Benedict

begintalknode;
	tag = 500;
	state = -1;
	nextstate = 885;
	question = "Benedict";
	text1 = "An elderly, angular man sits behind the counter, glumly polishing a shield. There is plenty of armor behind the counter, which is peculiar considering the number of books in the shop.";
	text2 = "He looks up at you. _Another warrior. Fine. Welcome to my shop. I'm Benedict._";
	text5 = "Benedict looks you over. _Yes? Do you need anything else?_";
	action = INTRO;

begintalknode;
	state = 885;
	nextstate = 886;
	question = "_What sort of shop is this?_";
	text1 = "_Well, I'm a businessman, you know. This and that. My shop changes from time to time. Right now, I deal in armor._";

begintalknode;
	state = 886;
	nextstate = 888;
	question = "_What sort of business were you in before?_";
	text1 = "_I used to sell potions and such, but then the slimes started appearing. Armor suddenly became the best business to be in._ He sighs. _It's lonely work, running this shop, but productive._";

begintalknode;
	state = 886;
	nextstate = -1;
	question = "_This and that?_";
	text1 = "_Just this and that. And sometimes the other thing._";

begintalknode;
	state = 886;
	nextstate = 887;
	question = "_Why armor?_";
	text1 = "_I'd rather not deal in armor right now. Low margins. But cash is cash and business is business. You can purchase some if you want. Prices are a bit high, but what did you expect with all those slimes about?_";
	text3 = "He indicates the implausibly heavy armor he's wearing. _Those slimes may attack me any day. I'm going to be ready. You should be too. You should purchase some today, before the slimes are everywhere._";
	code =
		if (day_reached(25,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 887;
	nextstate = -1;
	question = "_Know anything about the slime plague?_";
	text1 = "_There are several sorts of them, and they are all dangerous in a different way. The ones who drip acid are the worst. Armor doesn't do a bit of good against acid. Still, armor usually helps a lot against them._";
	text3 = "_I did, but I'm forgetting as fast as I can. The slimes haven't attacked for a while. Might be able to switch back to selling potions soon._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 888;
	nextstate = -1;
	condition = gf(0,11) <= 1;
	question = "_Lonely? That's too bad._";
	text1 = "_Agreed. I used to have an assistant, years ago, named Dominique. She was a good person. Then she ended up being sent to Avernum. I would give a lot to know what happened to her._ He shakes his head. _Probably dead by now._";
	action = SET_SDF 0 11 1;
	code =
		toggle_quest(24,1);
	break;
	
begintalknode;
	state = 885;
	nextstate = -1;
	condition = gf(0,11) == 1 && gf(43,13) >= 1;
	question = "_I found out that Dominique is well, and she remembers you. Don't ask how I know._";
	code =
		run_hardcode(10);
	break;

begintalknode;
	state = 885;
	nextstate = -1;
	question = "_Can I buy some of your items?_";
	text1 = "You conclude your business.";
	code =
		begin_shop_mode("Benedict's Armor","Benedict's armor is not of high quality, and he doesn't have much of it. You're not surprised. Probably, by now, anyone who can afford protection has bought some.",26,5,3);
	break;

begintalknode;
	state = 885;
	nextstate = -1;
	condition = 1;
	question = "_I would like to sell something._";
	text1 = "You conclude your business.";	
	code = 
		begin_sell_mode();
	break;

begintalknode;
	state = 885;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_All right. Thank you. Come again!_";
	action = END_TALK;
	
// Kessle

begintalknode;
	tag = 520;
	state = -1;
	nextstate = 913;
	question = "Kessle";
	text1 = "The woman behind the counter is a barmaid made good. Her demeanor and clean, stylish clothes clearly mark her as the one in charge. _I'm Kessle. Welcome to my inn._";
	text5 = "Kessle mops up some beer on the counter and looks at you proudly. _Always glad to help out a traveler! Need anything else?_";
	action = INTRO;

begintalknode;
	state = 913;
	nextstate = 914;
	question = "_Nice inn you have here._";
	text1 = "_Thanks. I run the Crusty Sailor Inn. I feel that, even in the middle of all the slimes and horror, we should still have a little luxury to get us through. We have fine beer for ten coins, fine wine for twenty, and luxurious rooms for only thirty coins._";
	text2 = "_What would you like?_";

begintalknode;
	state = 913;
	nextstate = -1;
	question = "_Have the slimes given the Crusty Sailor much trouble?_";
	text1 = "_Not yet. We're the finest inn in the continent of Valorim, and one of the few buildings in Krizsan the slimes haven't attacked._";
	text3 = "_Well, we're still the finest inn in the continent of Valorim. We did get one of our rooms wrecked by a slime not long ago, but don't worry. I had my walls reinforced, so you shouldn't have any problems if you stay here._";
	code =
		if (day_reached(25,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 914;
	nextstate = 915;
	question = "_How have your patrons reacted to the slimes?_";
	text1 = "_We have to be careful in these dark days. And we also have to keep clear heads. Good heavens! Some people from the northern cities said the monsters were being sent by the Avernites!_";

begintalknode;
	state = 915;
	nextstate = 916;
	question = "_Which northern cities?_";
	text1 = "_You know. Sharimik, Lorelei, Gale, those cities. They have their own problems, and they're just itching for someone to blame it on. And the Avernites are who they chose._";

begintalknode;
	state = 916;
	nextstate = -1;
	question = "_Tell us about Sharimik?_";
	text1 = "_The closest city to the north. It's on the west coast. Hear they've been having troubles with raids of huge, brutal humanoids. That's the rumor, anyway._";

begintalknode;
	state = 916;
	nextstate = -1;
	question = "_Where is Lorelei?_";
	text1 = "_A few hundred miles to the north, at the northern tip of a mountain chain. I hear tell that's giant territory now. Very dangerous._";

begintalknode;
	state = 916;
	nextstate = -1;
	question = "_Tell us about Gale._";
	text1 = "_It's far, far to the northeast. Haven't met anyone from there in months. Don't know a thing about their situation. Once you've reached Gale, though, you've just about run out of Valorim to travel through._";

begintalknode;
	state = 916;
	nextstate = 917;
	question = "_So you don't think the monsters are being caused by Avernites?_";
	text1 = "_Isn't that silly? I mean, the Avernites have plenty of reason to hate us, but even if they had the power to do that, why would they want to attack those of us out here in Krizsan? I mean, this is the rear end of nowhere!_";

begintalknode;
	state = 917;
	nextstate = -1;
	question = "_You don't think Krizsan is important?_";
	text1 = "_Important to me perhaps, but let's be honest. Krizsan is a beautiful city, but it's the youngest and farthest out of the cities in Valorim. This is as far from the center of the action in the Empire as you can get._";

begintalknode;
	state = 914;
	nextstate = -1;
	question = "_What's a good place in town to buy rations?_";
	text1 = "_I think that Herron might still be selling his goods. See if you can find his shop._";

begintalknode;
	state = 914;
	nextstate = -1;
	question = "_Anywhere where I can sell my loot?_";
	text1 = "_Find Jinx. She sells weaponry, mainly, but she'll also pay a fair price for your goods._";

begintalknode;
	state = 913;
	nextstate = -1;
	condition = coins_amount() >= 10;
	question = "_I'll have some beer._ Pay 10 coins.";
	text1 = "After years of drinking swill-like mushroom beer in Avernum, this rich, dark brew is enough to bring you to tears. You down every drop.";
	code =
		force_char_status(30000,1,20);
		change_coins(-10);
	break;

begintalknode;
	state = 913;
	nextstate = -1;
	condition = coins_amount() >= 20;
	question = "_Can I get some wine?_ Pay 20 coins.";
	text1 = "The wine is sublime. It takes a while for your tongue to get used to it, but when it does, the stuff is exquisite. Your heads spin gently.";
	code =
		force_char_status(30000,1,20);
		change_coins(-20);
	break;

begintalknode;
	state = 913;
	nextstate = -1;
	condition = coins_amount() >= 30;
	question = "_I need a room for the night._ Pay 30 coins.";
	text1 = "With a deep bow, Kessle shows you to your room. The walls have been recently reinforced and the beds look very comfortable. You have an extremely restful night.";
	action = END_TALK;	
	code =
		revive_party();
		change_coins(-5);
		relocate_char(get_pc_id(0),50,54,FALSE);
		relocate_char(get_pc_id(1),51,54,FALSE);
		relocate_char(get_pc_id(2),51,55,FALSE);
		relocate_char(get_pc_id(3),50,55,FALSE);
	break;

begintalknode;
	state = 913;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything._";
	text1 = "_Goodbye, then. Come back when you need to relax._";
	action = END_TALK;

// Denzil

begintalknode;
	tag = 540;
	state = -1;
	nextstate = 941;
	question = "Denzil";
	text1 = "You meet a seedy-looking sailor, walking around town looking bored. He shuffles over to you. It seems he finds talking to you preferable to doing nothing. _I'm called Denzil. Howdya' do?_";
	text5 = "Denzil scratches himself. He looks very bored. Even bored enough to talk to wandering adventurers.";
	action = INTRO;

begintalknode;
	state = 941;
	nextstate = 942;
	question = "_Do you have an occupation?_";
	text1 = "He shrugs and spits. _Normally, I'm a sailor. It's a disaster for people in my trade these days, I tells' ya'!_ ";

begintalknode;
	state = 942;
	nextstate = 943;
	question = "_Do you like being a sailor?_";
	text1 = "He scratches a tattooed arm. _Eh. Bad trade to be in these days. Nobody is shipping anything anywhere. Too many monsters._";

begintalknode;
	state = 942;
	nextstate = 943;
	question = "_What's a disaster?_";
	text1 = "_No ships going anywhere these days. Everyone's afraid of being brought more monsters, or being attacked, or this and that. Me, I plan to keep moving._";

begintalknode;
	state = 943;
	nextstate = 944;
	question = "_People must be afraid of the slimes spreading._";
	text1 = "_Betcha' think this is the only place with lots of monsters. Don't kid yourself. I've heard the rumors. We sailors get around. There's monsters running around everywhere. Watch your back._";
	text2 = "_As for me, I'm running._";

begintalknode;
	state = 944;
	nextstate = -1;
	question = "_Where are you moving to?_";
	text1 = "_I'm waiting to sign on with some merchants going west. There's a town called Pergies to the west, hasn't been attacked much. Maybe I'll be safe there. Sure getting out of here as soon as I can. Way too many monsters!_ ";
	text2 = "_Well, Pergies is about the end of nowhere. But if more monsters show up, I'll keep running even if I have to swim the ocean!_ ";
	code =
		if (which_town() == 0)
			rs(2);
			else rs(1);
	break;
	
begintalknode;
	state = 941;
	nextstate = 945;
	question = "_You look like you've traveled a lot. Heard any rumors?_";
	text1 = "He leans close to you, close enough for you to savor his somewhat acrid smell. _In fact, I have. Want to hear what I've heard?_";

begintalknode;
	state = 945;
	nextstate = 946;
	question = "_Sure._";
	text1 = "_I've heard that the Avernites walk among us. They're found a way to come to the surface and they're traveling around._";

begintalknode;
	state = 946;
	nextstate = -1;
	question = "_And do you believe this?_";
	text1 = "_Hell no! The Empire itself put them down there. I believe that anyone the Empire puts away stays put away. I think it'll take a lot more than a bunch of ignorant cave dwellers to put one over on the Empire._";
	text2 = "He nods, confident he's given you some solid advice. Then he moves on.";
	action = END_TALK;

// Captain Agrod

begintalknode;
	tag = 680;
	state = -1;
	nextstate = 1257;
	question = "Captain Agrod";
	text1 = "You meet a captain of the Empire army. He has a squashed, puffy face and a huge nose. He looks at you with extreme distrust.";
	text2 = "_I'm Captain Agrod,_ he grumbles. He really isn't sure how to deal with you.";
	text5 = "Captain Agrod looks uncomfortable with your presence. _What else do you want?_";
	action = INTRO;

begintalknode;
	state = 1257;
	nextstate = 1258;
	question = "_Can you tell me what your position is in Krizsan?_";
	text1 = "He pulls out a small hip flask and takes a swig from it. _I'm the Empire liaison for this area. I hope you don't plan to cause trouble. We have enough._";
	text3 = "He pulls out a small hip flask and takes a swig from it. _Keeping people like you from causing trouble. I'm the Empire liaison for this area. I'm the one who ended the slime plagues here._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 1258;
	nextstate = -1;
	question = "_Do you always drink while working?_";
	text1 = "He grunts and takes another swig. _If you had to live around here, you'd take a nip once in a while too._";

begintalknode;
	state = 1258;
	nextstate = 1259;
	question = "_What is an Empire liaison for?_";
	text1 = "_The Empire stuck me out here in the middle of nowhere to look after things and implement their inane policies. Speaking of which, what's your opinion on unicorns?_";

begintalknode;
	state = 1258;
	nextstate = -1;
	question = "_Why do you think I'm a troublemaker?_";
	text1 = "_Look, we all know there are Avernites wandering around. If you were near the center of the Empire, this would be a serious problem. But this is the middle of nowhere, and we don't care here._";
	text2 = "_Just don't cause trouble._";

begintalknode;
	state = 1259;
	nextstate = -1;
	question = "_Is this really the middle of nowhere?_";
	text1 = "_Well, the south end of nowhere, but yes. That's what Krizsan Province is, that's for sure. The most remote end of the Empire._";

begintalknode;
	state = 1259;
	nextstate = -1;
	question = "_What kinds of inane policies?_";
	text1 = "_The Empire is too busy crushing anyone who questions it to worry about what happens in the middle of nowhere. They don't send anyone out here to help out, only to tell people what to do and not offer assistance._";
	text2 = "_For example, this area is being torn apart and I'm supposed to be hiring people to deal with the unicorns._";

begintalknode;
	state = 1259;
	nextstate = -1;
	question = "_Unicorns? Tell me about the unicorns._";
	code =
		run_hardcode(11);
	break;


begintalknode;
	state = 1259;
	nextstate = -1;
	question = "_Maybe I don't want to kill unicorns._";
	text1 = "_Suit yourself. You might change your mind when one of those critters is about to impale your guts._";
	
begintalknode;
	state = 1257;
	nextstate = -1;
	condition = gf(0,26) == 1;
	question = "_I'd like to sell some unicorn horns to you._ (Sell them.)";
	code =
		run_hardcode(119);
	break;

begintalknode;
	state = 1258;
	nextstate = -1;
	condition = gf(307,3) >= 1;
	question = "_You didn't do that get rid of the slimes. I did._";
	text1 = "_But you won't be writing a report to the Empire. And I will. So there it is._";

begintalknode;
	state = 1257;
	nextstate = -1;
	condition = 1;
	question = "_I don't need anything else._";
	text1 = "_Good. Go away._";
	action = END_TALK;
	
// Valoda

begintalknode;
	tag = 700;
	state = -1;
	nextstate = 1285;
	question = "Valoda";
	text1 = "There is an officious-looking woman with a turned-up nose behind the counter. While she looks up at you, she nervously shuffles papers with her hands. _I am Valoda. Welcome, travelers. Would you like a job?_";
	text5 = "Valoda continues to rhythmically shuffle her papers.";
	action = INTRO;

begintalknode;
	state = 1285;
	nextstate = 1286;
	question = "_So what sort of job involves so many papers?_";
	text1 = "_I'm the delivery dispatcher. Even in these awful days, the mail must still go through._";
	action = SET_SDF 0 27 1;

begintalknode;
	state = 1286;
	nextstate = 1287;
	question = "_What is a delivery dispatcher?_";
	text1 = "_When someone needs something sent somewhere, they come to me, and I find someone to do it for them. If you'd like a mission, let me know._";
	text2 = "_Before you get a mission, however, I have some advice for you._";

begintalknode;
	state = 1286;
	nextstate = 1288;
	question = "_What's awful?_";
	text1 = "_It's nearly impossible to find anyone going anywhere these days. Too many monsters. Far too dangerous. People are paying plenty of money to the people who take my missions._";
	text3 = "She holds up the papers she's carrying in disgust. _Look at this! A bunch of slimes wrecked my office. I have to solicit adventurers from the council room! This is untenable, it really is. Thank goodness I have a great sense of duty._";
	code =
		if (day_reached(25,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 1286;
	nextstate = -1;
	question = "_Who's responsible for the mail service?_";
	text1 = "_The Empire of course. The Empire insists the mail continues to move as much as possible. It might occur to some that perhaps they should send more troops to help us and fewer orders for us to obey._";
	text2 = "She sighs. _It is, of course, not my place to criticize the Empire._";

begintalknode;
	state = 1285;
	nextstate = 1292;
	question = "_What sort of jobs do you have available?_";
	text1 = "_You have not yet been forgiven for failing to follow through on the earlier job you got here. It will be some time before you will be trusted with another task._";
	text2 = "_Consult the board by the west wall. Take any task you think you can do. Beware. If you fail to complete the job in time, you will not be trusted with a task for a while._";
	code =
		if (gf(303,0) == 0)
			rs(1);
			else rs(2);
	break;

begintalknode;
	state = 1292;
	nextstate = -1;
	question = "_Those look like courier jobs. Anything more ... adventurey?_";
	text1 = "_There is another job board outside city hall to the west. That is for the tasks that involve actual danger._";

begintalknode;
	state = 1288;
	nextstate = 1289;
	question = "_Are you worried about the monsters?_";
	text1 = "She shuffles the papers nervously. _One slime could wreck all of my records! I'm a constant wreck with worry!_";
	text3 = "_The monsters are getting to be too much! They destroyed my office!_";
	code =
		if (day_reached(25,0))
			remove_string(1);
			else remove_string(3);
	break;

begintalknode;
	state = 1289;
	nextstate = -1;
	question = "_What sorts of records do you keep?_";
	text1 = "She looks distressed. _I have records of every mission I ever gave, and the outcome! How am I supposed to work if I lose that information!_";

begintalknode;
	state = 1287;
	nextstate = 1290;
	question = "_What's your advice?_";
	text1 = "_These are paranoid times. You may not want to take a mission to a city until you know you will be let in. Also, we job dispatchers are unforgiving of failure._";

begintalknode;
	state = 1290;
	nextstate = -1;
	question = "_What happens if I fail to complete a mission?_";
	text1 = "_Fail to complete one of my jobs on time, and don't be surprised if I don't give you another for a few months._";

// Falko

begintalknode;
	tag = 720;
	state = -1;
	nextstate = 1313;
	question = "Falko";
	text1 = "You meet an archer in the watchtower. He looks very nervous and constantly watches the ground around him. He moves quickly up to you, watching for slimes as he moves. _I'm Falko._";
	text5 = "Falko keeps his eyes on the surrounding countryside.";
	action = INTRO;

begintalknode;
	state = 1313;
	nextstate = 1314;
	question = "_What are you looking out for?_";
	text1 = "He emits a brittle laugh. _I'm watching the walls, to see if slimes are burning through them. Bloody suicide mission!_ Though he seems nervous, you note that he has the stance and steady eye of a highly skilled archer.";

begintalknode;
	state = 1314;
	nextstate = 1315;
	question = "_How do the slimes get into Krizsan?_";
	text1 = "_Slimes are always trying to get through the city walls. They sit on the wall and wait, and their natural acids burrow a tunnel through the wood. I'm here because someone has to watch for them, and you can only really get a good look from up here._";
	text2 = "_A job for expendables, if you ask me._";

begintalknode;
	state = 1314;
	nextstate = 1315;
	question = "_You're not dead yet._";
	text1 = "_Yet. I'm supposed to watch for slimes on the walls, but it's only a matter of time before one of them gets the drop on me. Not that the captains consider me expendable or anything, but they do._";
	text3 = "_And I hope to stay not dead. I think I'll make it too. Lots less slimes around these days._";
	action = DEP_ON_SDF 307 3 0;

begintalknode;
	state = 1315;
	nextstate = 1316;
	condition = gf(307,3) == 0;
	question = "_I doubt your commander thinks you're expendable._";
	text1 = "_It's such a waste, because I got good ideas! I do!_";

begintalknode;
	state = 1316;
	nextstate = 1317;
	question = "_What kinds of good ideas?_";
	text1 = "_Like, I think we should find out what the deal is with those brigands who have slimes with them._";

begintalknode;
	state = 1317;
	nextstate = -1;
	question = "_Brigands are using slimes?_";
	text1 = "_There are brigands out there who can actually command the slimes! I heard someone say they saw them coming out of the mountains not far to the west! Maybe if we could find out how they command the slimes, we could do it too!_";

begintalknode;
	state = 1315;
	nextstate = 1318;
	condition = gf(307,3) >= 1;
	question = "_Now that the slimes are gone, perhaps you deserve a vacation._";
	text1 = "_Actually, I could. I'm just a volunteer. I'm not part of the regular army. And, now that I know they can be beat, I'd like to take the battle to the monsters._";

begintalknode;
	state = 1318;
	nextstate = -1;
	question = "_Any plans?_";
	text1 = "_I might travel to Shayder. On the Isle of Bigail, to the northwest. I've heard rumors that they have their own monster plague to deal with. Giant bugs. Can you imagine?_";
	action = END_TALK;
